package model

import (
	"time"
)

const DefineBuildName = "define_build"

type DefineBuild struct {
	Id   int               `json:"id" orm:"auto" sql:"INT"`
	Key  string            `json:"key" sql:"VARCHAR"`
	Name map[string]string `json:"name" sql:"JSON"`
	Desc map[string]string `json:"desc" sql:"JSON"`

	Level int `json:"level" sql:"TINYINT"`

	CanUnit       bool                     `json:"can_unit" sql:"TINYINT"`
	FilterRequire CompareDataRelationSlice `json:"filter_require" sql:"JSON"`

	Type            byte   `json:"type" sql:"TINYINT"`
	Range           []int  `json:"range" sql:"JSON"`
	FixRange        int    `json:"fix_range" sql:"INT"`
	CanDestroy      bool   `json:"can_destroy" sql:"TINYINT"`
	NeedManage      bool   `json:"need_manage" sql:"TINYINT"`
	DestroyItem     int    `json:"destroy_item" sql:"INT"`
	AttackRangeMask []uint `json:"attack_range_mask" sql:"JSON"`

	SyncKeys []string `json:"sync_keys" sql:"JSON"`

	UpdateTime *time.Time `json:"update_time" orm:"updateTime" sql:"DATETIME"`
}
